package com.meizi.daily.vo;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.meizi.daily.status.SatisfactionEnum;
import com.meizi.daily.status.WalletTypeEnum;
import com.meizi.daily.entity.Consumption;
import lombok.Data;

/**
 * @author meizi
 * @date 2020/5/30 16:17
 * @email enjoymeizi@gmail.com
 */
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ConsumptionVo extends Consumption {
    private String categoryName;
    private String payType;
    private String walletTypeName;
    private String satisfactionName;

    public String getWalletTypeName() {
        if (this.getWalletType() != null) {
            return WalletTypeEnum.getMessage(this.getWalletType());
        }
        return null;
    }

    public String getSatisfactionName() {
        if (this.getSatisfaction() != null) {
            return SatisfactionEnum.getMessage(this.getSatisfaction());
        }
        return null;
    }
}
